﻿//JumbotCms_4.1 Final
using System;
using System.Data;
using System.Web;
using JumbotCms.API;
namespace JumbotCms.WebFile.User
{
    public partial class _changeavatarUpload : JumbotCms.API.UserCenter
    {
        public string FlashVars = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            string _sUserUploadPath = site.Dir + "_data/tempfiles/";
            string _sUserUploadType = "*.jpg;*.bmp;";
            int _sUserUploadSize = 1024;
            User_Load("", "html");
            Jumbot.Common.DirFile.CreateDir(_sUserUploadPath);
            string sFileName = "avatar";  // 文件名称
            string FinalFileName = _sUserUploadPath + "user_" + UserId + "_" + sFileName;        // 最终文件路径
            FlashVars = "UploadPage=CustomerHandler.aspx&" +
                "Args=author=jumbot;homepage=jumbotcms.net;filename=" + FinalFileName + "&" +
                "FinalFileName=" + FinalFileName + "&" +
                "CompletedFunction=OnCompleted&" +
                "FileLimitBytes=" + (_sUserUploadSize * 1024) + "&" +
                "FileExtension=" + _sUserUploadType;
        }
    }
}
